﻿@model ElectrosLTD.Models.RegistrationModel

@{
    ViewBag.Title = "Register";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Register</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>RegistrationModel</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Surname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Surname)
            @Html.ValidationMessageFor(model => model.Surname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.HouseNo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.HouseNo)
            @Html.ValidationMessageFor(model => model.HouseNo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Street)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Street)
            @Html.ValidationMessageFor(model => model.Street)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Postcode)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Postcode)
            @Html.ValidationMessageFor(model => model.Postcode)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Town)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Town)
            @Html.ValidationMessageFor(model => model.Town)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.countryID)
        </div>
        <div class="editor-field">
            
            @Html.DropDownListFor(model => model.countryID, Model.countryList.ToList())
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Mobile)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Mobile)
            @Html.ValidationMessageFor(model => model.Mobile)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.username)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.username)
            @Html.ValidationMessageFor(model => model.username)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.password)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.password)
            @Html.ValidationMessageFor(model => model.password)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Home Page", "Index", "Home")
</div>
